Release 10.1A: OpenEdge Development:
Progress 4GL Reference
EDITOR phrase
Specifies that a field or variable is displayed as a text editor widget. This is especially useful for long text (CHARACTER and LONGCHAR) fields. The EDITOR phrase is an option of the VIEW-AS phrase.
Syntax
size-phraseSpecifies the outer width and height of the text editor widget in characters or pixels. This is the syntax for size-phrase:
For more information, see the SIZE phrase reference entry.
INNER-CHARScharsINNER-LINESlinesSpecifies the number of characters visible in each line of the Editor and the number of lines visible within the Editor. Both
charsandlinesmust be integer constants.Note that the values you supply for INNER-CHARS and INNER-LINES specify only the size of the editing area, not the overall size of the editor widget. The overall size is determined by the size of the editing area plus the sizes of the margin and border heights and widths.
BUFFER-CHARScharsIn character mode, specifies the number of characters a user can enter on each line. When the last character is typed, the text input cursor automatically wraps to the next line. This option is ignored in graphical environments.
The
charsvalue must be an integer constant that is equal to or greater than the value specified by SIZEwidthor INNER-CHARSchars. If greater, horizontal scrolling is enabled. The default is the value specified by SIZEwidthor INNER-CHARSchars.BUFFER-LINESlinesIn character mode, specifies the number of lines a user can enter. By default, Progress does not limit the number of lines (although system limits might apply). This option is ignored in graphical environments.
The
linesvalue must be an integer constant that is equal to or greater than the value specified by BYheightor INNER-LINESlines. If equal, vertical scrolling is disabled.LARGESpecifies that Progress use a large editor widget rather than a normal editor widget in Windows. A normal Windows editor can contain up to 20K of data. The LARGE option allows the editor to contain data up to the limit of your system resources. However, it also consumes more internal resources and lacks some functionality. Use the LARGE option only if you have to edit very large sections of text. The LARGE option applies only to Windows; other interfaces allow for larger editors by default. This option is ignored in those other interfaces.
MAX-CHARScharactersThe maximum number of characters that can be displayed or entered within the text editor widget. The value
charactersmust be an integer constant. By default, Progress does not limit the number of characters (although system limits might apply).NO-BOXSpecifies that the editor be displayed without a border. The default is to display the editor with a border. The NO-BOX option has no effect on the size of the editor.
NO-WORD-WRAPSpecifies that word wrap be disabled within the text editor widget. If you enable word wrap, horizontal scrolling is disabled. This option is ignored in character mode. This is the default with the LARGE option.
SCROLLBAR-HORIZONTALSpecifies that horizontal scrolling is enabled and a horizontal scroll bar is displayed for the widget.
SCROLLBAR-VERTICALSpecifies that a vertical scroll bar is display for the widget. Although vertical scrolling is always enabled within a text editor widget, a vertical scroll bar is displayed only if you specify this option.
TOOLTIPtooltipAllows you to define a help text message for a text field or text variable. Progress automatically displays this text when the user pauses the mouse button over a text field or text variable for which a tooltip is defined.
You can add or change the TOOLTIP option at any time. If TOOLTIP is set to "" or the Unknown value (
Example?), then the tooltip is removed. No tooltip is the default. The TOOLTIP option is supported in Windows only.The following example uses two editor widgets. The item.cat-description field is viewed as an editor in the item-info frame and the variable my_clipbd is viewed as an editor in the clip frame. Use the editor functions provided by your interface environment to copy text from a cat-description into my_clipbd. You can then subsequently copy that text into the cat-description field of another item.
Notes
- If you specify the SCROLLBAR-VERTICAL option in, a vertical scroll bar appears on the side of the Editor. The user can then use the scroll bar to scroll within the widget. Whether or not you specify SCROLLBAR-VERTICAL, the user can scroll vertically by using the up and down arrow keys to move above or below the displayed text.
- If you use the SIZE phrase to specify the dimensions of the Editor, Progress uses a portion of this overall space (thereby shrinking the size of the editing area) for any scroll bars you specify. Use the INNER-CHARS and INNER-LINES options if you want a fixed size for the editing area, regardless of the presence of scroll bars.
- In Windows, the editor widget supports lines of up to 255 characters only.
- By default, the editor widget supports text wrap. This means that when you reach the end of a line within the widget, text wraps to the next line rather than scrolling to the right. In graphical interfaces, you can enable horizontal scrolling by specifying either the NO-WORD-WRAP or SCROLLBAR-HORIZONTAL options. If you specify SCROLLBAR-HORIZONTAL, a horizontal scroll bar appears. If you specify NO-WORD-WRAP, but not SCROLLBAR-HORIZONTAL, the user can scroll horizontally by using the left and right arrow keys at the edge of the displayed text.
- Windows allows a user to transfer focus to the editor by pressing ALT and one of the letters in the label. This is called a mnemonic.
- The character-mode editor does not support the tab character. When Progress reads a file that contains tabs into an editor widget, it replaces the tabs with eight spaces. When it writes the file, the tabs are not restored and the file is permanently changed.
- When you specify the LARGE option, the following attributes and methods no longer apply to the editor:
- For SpeedScript, the only valid options are:
size-phrase, INNER-CHARS, INNER-LINES, MAX-CHARS, NO-BOX, NO-WORD-WRAP.See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |